import { createRequest } from '/@/api/service';
const module = 'ib/base/v1/messageInformation/';

/**
 * @function 资讯查询
 * @param data
 * @param header
 * @returns {Promise}
 */
function MESSAGE_INFORMATION_QUERY(
  data: MessageInformation.MessageInformationQueryReq,
  header: object = {},
): Promise<MessageInformation.MessageInformationQueryResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}messageInformationQuery`,
    data,
    header,
    'POST',
  );
}

/**
 * 消息详情信息
 * @param data id
 * @param header 空
 * @returns 消息详情实体
 */
function MESSAGE_INFORMATION_DETAIL(
  data: MessageInformation.MessageInformationDetailReq,
  header: object = {},
): Promise<MessageInformation.MessageInformationDetailResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}messageInformationDetail`,
    data,
    header,
    'POST',
  );
}

export { MESSAGE_INFORMATION_QUERY, MESSAGE_INFORMATION_DETAIL };
